function appinit() {
  new Swiper('#swiper1', {
    direction: 'horizontal', // 水平切换选项
    loop: true, // 循环模式选项
    autoplay: {  //自动轮播
      delay: 4000,
      disableOnInteraction: false
    },
    // 如果需要分页器
    pagination: {
      el: '.swiper-pagination',
    }
  })
  new Swiper('#swiper2', {
    direction: 'horizontal', // 水平切换选项
    loop: true, // 循环模式选项
    autoplay: {
      delay: 3000,
      disableOnInteraction: false
    },
  })
  new Swiper('#swiper3', {
    direction: 'horizontal', // 水平切换选项
    loop: true, // 循环模式选项
    autoplay: {
      delay: 3000,
      disableOnInteraction: false
    },
  })

  // 点击轮播图跳到邀请朋友页面
  $('.slide').click(function () {
    // console.log('aaa')
    window.location.href = "/view/index/yqpy.html";
  })

  // 点击文章标题跳到文章详情页面
  $('.ads .con').click(function () {
    window.location.href = "/view/index/article.html";
  })

  // 点击商品跳到商品详情页面
  $('.aaa-content .content').click(function () {
    window.location.href = "/view/index/spxq_gm.html";
  })


}
function fabu() {
  $('.fabu').show()
  console.log('11111')
  $('body').css('overflow-y', 'hidden')
}

function cancel() {
  $('.fabu').hide()
  console.log('11111')
  $('body').css('overflow-y', 'visible')
}
//vue
var vm = new Vue({
  el: '#app',
  data: {
    swiper_list:[],//轮播广告列表
  },
  methods: {
    init:function(){
      appinit();
      this.get_swiper_list();
    },
    // 获取轮播广告列表
    get_swiper_list:function(){
      var that = this;
      $.get(app.webUrl + '/basic/api_base/advert_list',{adt:'2',tyid:'8'},function(ret){
        that.swiper_list = ret.data;
      }).fail(function(err){
        console.log(err)
      });
    }
  },
  mounted:function() {
    this.init();
  },

})